package org.fyp.synchrona.moodle.communication;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;

import com.google.gdata.client.GoogleAuthTokenFactory;
import com.google.gdata.util.AuthenticationException;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.mime.MultipartEntity;
import org.apache.http.entity.mime.content.StringBody;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.protocol.HTTP;
import org.apache.http.util.EntityUtils;
import org.apache.http.HttpEntity;

public class Communication {
	
	private String userName;
	
	private String password;
	
	private GoogleAuthTokenFactory factory;
	
	private String token;
	
	private String serviceUrl = "http://www.blogger.com/home";
	
	private String loginUrl = "http://localhost/moodle/login/index.php";
	
	HttpClient httpclient ;
	
	public Communication(String userName, String password){
		this.userName = userName;
		this.password = password;
		httpclient = new DefaultHttpClient();
	}
	
	public String getUserName(){
		return this.userName;
	}

	public String getPassword(){
		return this.password;
	}
	
	public String getToken(){
		return this.token;
	}
	
	public GoogleAuthTokenFactory getGoogleAuthTokenFactory(){
		return this.factory;
	}
	
	public String getServiceURL(){
		return this.serviceUrl;
	}
	
	public String getLoginURL(){
		return this.loginUrl;
	}
	
	public HttpClient getHttpClient(){
		return httpclient;
	}
}
